# define a function that outputs N factorial
def Factorial(n):
    """
    @param n: depend the N
    @return: result of N factorial
    """
    if n == 0 or n == 1:
        return 1
    else:
        return n * Factorial(n - 1)
for i in range(1, 10):
    print(Factorial(i))